package com.zjt.entity.resource;

import com.zjt.entity.BaseEntity;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created with IntelliJ IDEA.
 * User: xueyanbeijing
 * Date: 12-8-24
 * Time: AM6:13
 * 暂时用不上，将来扩展用
 * 品牌类别资源表主要是产品的图片列表
 * 例如：茅台（brand） 白酒(category)  系列（series）
 * To change this template use File | Settings | File Templates.
 */
@Entity
//表名与类名不相同时重新定义表名.
@Table(name="s_product_resource")
//默认的缓存策略.
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class ProductResource extends BaseEntity {
    private long productId;
    private String path;      //实际路径
    private String urlPath;  //网络路径
    private String title;   //标题说明
    private String type;
    private long size;       //大小
    //private int isPress;//是否打水印

    public long getProductId() {
        return productId;
    }

    public void setProductId(long productId) {
        this.productId = productId;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getUrlPath() {
        return urlPath;
    }

    public void setUrlPath(String urlPath) {
        this.urlPath = urlPath;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    @Override
    public String toString() {
        return "ProductResource{" +
                "productId=" + productId +
                ", path='" + path + '\'' +
                ", urlPath='" + urlPath + '\'' +
                ", title='" + title + '\'' +
                ", type='" + type + '\'' +
                ", size=" + size +
                '}';
    }
}
